package cn.com.qiancheng.service;

import cn.com.qiancheng.dao.AdminDao;
import cn.com.qiancheng.dto.AdminDto;

public class AdminService {
	public AdminDto validate(String userName, String password) {
		AdminDao dao = new AdminDao();
		AdminDto admin = dao.searchAdminByUserName(userName);
		if (admin != null && admin.getPassword().equals(password)) {
			return admin;
		}
		return null;
	}
}
